SetCTitle
SetCTitle
Set ( change) the text associated with a control Str255 title ; address of Pascal-style string; new title SetCTitle sets the text associated with a control. The text is redrawn immediately.
theControl is a handle leading to a variable-length ControlRecord structure. It identifies which control should be modified.
title is the address of a Pascal-style length-prefixed string. If the string will not fit in the control's contrlRect, it is truncated.
Notes: Control titles are typically changed for toggle buttons; e.g., after a user
selects a button titled "Full Screen", you may wish to toggle it to "Half
Screen" as follows:
Title strings may be up to 255 bytes in length, but the text is truncated to
fit in the control's enclosing rectangle. With the 128K ROMs (and/or
version 4.0 CDEFs/System 3.2 or later), control titles may be multiple
lines, wrapping to fit inside the rectangle.
If you want the title text to be displayed in a font other than 12-pt chicago,
use a "ctrlType" (ie, variation code) of 8, 9, or 10 when you create the
control (see NewControl) and then use Window Manager calls such as You may obtain the current title text using GetCTitle.